//
//  AiResEngineDelegate.h
//  AiEngine2
//
//  Created by imac on 13-8-15.
//  Copyright (c) 2013年 Midfar Sun. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AiSpeechEngineDelegate.h"

@class AiResEngine ;

@protocol AiResEngineDelegate <NSObject>

@required
/**
 *	@brief	引擎初始化是否成功
 *
 *	@param 	state      是否成功 (成功:OPT_SUCCESS 失败:OPT_FAILED)
 */
-(void)aiResEngine:(AiResEngine *)engine onInit:(NSNumber *)state ;

/**
 *	@brief	引擎收到了评测结果
 *
 *	@param 	engine      引擎对象
 *	@param 	recordId 	录音流ID
 *	@param 	jsonString 	服务端返回JSON结果
 */
-(void)aiResEngine:(AiResEngine *)engine didReceive:(NSString *)recordId responseJson:(NSString *)jsonString;

/**
 *	@brief	上报录音数据
 *
 *	@param 	engine      引擎对象
 *	@param 	recordId 	录音ID
 *	@param 	binaryData 	音频数据
 */
-(void)aiResEngine:(AiResEngine *)engine didReceive:(NSString *)recordId responseBinary:(NSData *)binaryData;

/**
 *	@brief	引擎收到了出错响应
 *
 *	@param 	engine      引擎对象
 *	@param 	recordId 	录音ID
 *	@param 	jsonString 	错误JSON字符串
 */
-(void)aiResEngine:(AiResEngine *)engine didReceive:(NSString *)recordId errorJson:(NSString *)jsonString;

@end
